package com.rao.travel.utils;

import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

/**
 * @author Srao
 * @version 1.0
 * @className PasswordEncoderUtils
 * @date 2019/10/31 21:02
 * @package com.rao.travel.utils
 * @description
 */
public class PasswordEncoderUtils {

    private static BCryptPasswordEncoder passwordEncoder = new BCryptPasswordEncoder();

    public static String encoder(String password){
        return passwordEncoder.encode(password);
    }

    public static void main(String[] args) {
        String password = "b";
        String s = encoder(password);
        //$2a$10$/Bp8Njm6W8Hd3Gj7ncRBpusHvulR4txaI8Vlq72geVrUteNe1SpF2
        //$2a$10$hm1y/jzmhvDzm4rC7HDh.OLlTcl2Y8xGSbqrFpx2BGH0FKa8.yQTu
        System.out.println(s);
    }
}
